-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql,colexec: minor cleanup of scan-related things #57267
Conversation
pkg/sql/distsql_physical_planner.go
Outdated
@@ -1013,8 +1013,8 @@ func tableOrdinal( | |||
} | |||
if visibility == execinfra.ScanVisibilityPublicAndNotPublic { | |||
offset := len(desc.Columns) | |||
for i, col := range desc.MutationColumns() { | |||
if col.ID == colID { | |||
for i := range desc.MutationColumns() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract desc.MutationColumns()
outside of the loop, I don't think the compiler can necessarily eliminate the common subexpression here.
pkg/sql/distsql_physical_planner.go
Outdated
for _, col := range info.desc.MutationColumns() { | ||
typs = append(typs, col.Type) | ||
for i := range info.desc.MutationColumns() { | ||
typs = append(typs, info.desc.MutationColumns()[i].Type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto above
pkg/sql/distsql_physical_planner.go
Outdated
for _, c := range info.desc.MutationColumns() { | ||
descColumnIDs.Set(colID, int(c.ID)) | ||
for i := range info.desc.MutationColumns() { | ||
descColumnIDs.Set(colID, int(info.desc.MutationColumns()[i].ID)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto above
This commit removes multiple arguments in favor of using the spec when initializing the cFetcher as well as refactors several loops in order to avoid making copies of descriptors during table reader planning. Additionally, it moves a map from scanNode next to the map's only user (stats job) and removes the map from the scanNode itself as well as removes some of the unused arguments. Release note: None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTR!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)
pkg/sql/distsql_physical_planner.go, line 1016 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
extract
desc.MutationColumns()
outside of the loop, I don't think the compiler can necessarily eliminate the common subexpression here.
Done.
pkg/sql/distsql_physical_planner.go, line 1288 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
ditto above
Done.
pkg/sql/distsql_physical_planner.go, line 1311 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
ditto above
Done.
57267: sql,colexec: minor cleanup of scan-related things r=yuzefovich a=yuzefovich This commit removes multiple arguments in favor of using the spec when initializing the cFetcher as well as refactors several loops in order to avoid making copies of descriptors during table reader planning. Additionally, it moves a map from scanNode next to the map's only user (stats job) and removes the map from the scanNode itself as well as removes some of the unused arguments. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
Build failed: |
Mysterious test failure with what-looks-like empty logs. bors r+ |
Build succeeded: |
This commit removes multiple arguments in favor of using the spec when
initializing the cFetcher as well as refactors several loops in order to
avoid making copies of descriptors during table reader planning.
Additionally, it moves a map from scanNode next to the map's only user
(stats job) and removes the map from the scanNode itself as well as
removes some of the unused arguments.
Release note: None